package com.shenyong.ladmin.service.Impl;

import com.shenyong.ladmin.entity.Level;
import com.shenyong.ladmin.mapper.adLevelMapper;
import com.shenyong.ladmin.result.Page;
import com.shenyong.ladmin.service.adLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author
 * @site
 * @company
 * @create
 */
@Service
public class adLevelServiceImpl implements adLevelService {
    @Autowired
    private adLevelMapper levelMapper;
    @Override
    public Map<String, Object> getLevelPage(Page page) {
        Map<String,Object> map=new HashMap<String,Object>();
        map.put("code",0);
        map.put("msg","");
        map.put("count",levelMapper.getLevleCount(page));
        map.put("data",levelMapper.getLevelPage(page));
        return map;
    }

    @Override
    public int LevelUpdate(Level level) {
        return levelMapper.LevelUpdate(level);
    }
}
